package com.vken.blog.dao.hibernate;

import java.util.List;

import com.vken.blog.dao.CategoryDao;
import com.vken.blog.model.Category;

public class CategoryDaoHibernate extends GenericDaoHibernate<Category, Integer> implements
		CategoryDao {
	public List<Category> getCategorysByBlogId(Integer id) {
		return getHibernateTemplate().find(
				"from Category as c where c.blog.id=? order by c.displayOrder desc,c.id",
				new Object[] { id });
	}	
}
